<template>
	<view class="dmm-container dmm-container-grey">
		<cl-descriptions>
			<cl-desc-item v-for="(item, index) in desc" :key="index" :label="item.label" :content="item.content" :isLink="item.isLink" url="/pages/agentManage/changeRate?modifyType=4">
			</cl-desc-item>
		</cl-descriptions>
	
	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex'
	import {
		deviceTypeEnum,
		deviceStatusEnum,
	} from "@/common/constants.js"

	export default {
		data() {
			return {
			}
		},

		computed: {
			...mapState('deviceManage', ['detail']),
			desc: function() {
				const {
					deviceType,
					deviceSn,
					deviceStatus,
					agentBy,
					purchaseAgent,
					purchaseTime,
					installTime,
					mno,
					manufacturer
				} = this.detail
				return [{
						label: '设备类型',
						content: deviceTypeEnum[deviceType]
					},
					{
						label: '设备序列号',
						content: deviceSn
					},
					{
						label: '设备状态',
						content: deviceStatusEnum[deviceStatus]
					},
					{
						label: '持有代理商',
						content: agentBy || '--'
					},
					{
						label: '采购代理商',
						content: purchaseAgent || '--'
					},
					{
						label: '采购时间',
						content: purchaseTime || '--'
					},
					{
						label: '商户编号',
						content: mno || '--'
					},
					{
						label: '厂商',
						content: manufacturer || '--'
					},
					
				]
			}
		},

		methods: {
		},

		onLoad(options) {
		}
	}
</script>

<style lang="scss">

</style>
